<template>
  <div>
    <!-- <utable :title="title" :datas="datas" :theads="theads" :pageSize="pageSize" :courrentPage="courrentPage">
    </utable> -->
    <a-tree
    class="draggable-tree"
    :default-expanded-keys="expandedKeys"
    draggable
    :tree-data="gData"
  />
  </div>
</template>

<script>
import utable from './ui/utable.vue'
import { tree } from 'ant-design-vue';
export default {
  components: { utable },
  data() {
    return {
      gData: [
        {
          "title": "0-0",
          "children":
            [
              {
                "title": "0-0-0",
                "children":
                  [
                    { "title": "0-0-0-0" },
                    { "title": "0-0-0-1" },
                    { "title": "0-0-0-2" }]
              },
              {
                "title": "0-0-1",
                "children":
                  [
                    { "title": "0-0-1-0" },
                    { "title": "0-0-1-1" },
                    { "title": "0-0-1-2" }]
              },
              { "title": "0-0-2" }]
        },
        {
          "title": "0-1",
          "children":
            [
              {
                "title": "0-1-0",
                "children":
                  [
                    { "title": "0-1-0-0" },
                    { "title": "0-1-0-1" },
                    { "title": "0-1-0-2" }]
              },
              {
                "title": "0-1-1",
                "children":
                  [
                    { "title": "0-1-1-0" },
                    { "title": "0-1-1-1" },
                    { "title": "0-1-1-2" }]
              },
              { "title": "0-1-2" }]
        },
        { "title": "0-2" }],
      expandedKeys: ['0-0', '0-0-0', '0-0-0-0'],
      msg: 'wellcome to my world',
      title: '学生信息',
      theads: ['姓名', '性别', '年龄', '爱好', '操作'],
      pageSize: 5,
      courrentPage: 0,
      datas: [
        { name: '张三', sex: '男', age: '18', hoppy: '打篮球', ca: '<button>详情</button>' },
        { name: '李四', sex: '女', age: '19', hoppy: '打篮球', ca: '<button>详情</button>' },
        { name: '王五', sex: '男', age: '20', hoppy: '打篮球', ca: '<button>详情</button>' },
        { name: '赵六', sex: '女', age: '21', hoppy: '打篮球', ca: '<button>详情</button>' },
        { name: '田七', sex: '男', age: '22', hoppy: '打篮球', ca: '<button>详情</button>' },
        { name: '孙八', sex: '女', age: '23', hoppy: '打篮球', ca: '<button>详情</button>' },
        { name: '周九', sex: '男', age: '24', hoppy: '打篮球', ca: '<button>详情</button>' },
      ]
    }
  },
  mounted() {
    console.log(this.gData)
  }
}
</script>
<style scoped>
.viewer {
  width: 80%;
  height: 800px;
  margin: 0px;
}
</style>
